{include file="public_head"}
{include file="public_menu"}
<style>
    body{
        background: #F6F6F6!important;
    }
    .new_limit_con{
        border-top:2px solid #e73f09;
        width: 100%;
        min-width: 1200px;
        background: url('__STATIC__/img/limit_bg.png') no-repeat center top;
    }
    .new_limit_con .con{
        width:1200px;
        margin: 0 auto;
    }
    .title_img{
        width:100%;
        display: block;
    }
    .list_time{
        padding:0 60px;
        overflow: hidden;
        margin: 0 auto;
        width:1200px;
    }
    .list_time li{
        width: 150px;
        float: left;
        background: white;
        margin-left: 60px;
        position: relative;
        height: 60px;
        z-index: 10;
    }
    .list_time li:first-child{
        margin-left: 0;
    }
    .list_time li:before{
        position: absolute;
        left: -60px;
        top:0;
        width: 60px;
        height: 60px;
        background: url("__STATIC__/img/limit_active.png") no-repeat;
        background-size: 100% 100%;
        content: '';
        transform: rotate(180deg);
        z-index: 9;
    }
    .list_time li:after{
        position: absolute;
        right: -60px;
        top:0;
        width: 60px;
        height: 60px;
        background: url("__STATIC__/img/limit_active.png") no-repeat;
        background-size: 100% 100%;
        content: '';
        z-index: 9;
    }
    .list_time .now{
        background: #E73F09;
        width:165px;
    }
    .list_time .now .time{
        padding-left: 20px;
    }
    .list_time .now:before{
        background: url("__STATIC__/img/limit_bg1.png") no-repeat;
        background-size: 100% 100%;
        transform: rotate(180deg);
    }
    .list_time .now:after{
        background: url("__STATIC__/img/limit_bg1.png") no-repeat;
        background-size: 100% 100%;
        transform: rotate(0deg);
    }
    .list_time li table td{
        height: 60px;
        color: #333;
    }
    .list_time li table .time{
        font-size: 20px;
        font-weight: bold;
        padding-right: 10px;
    }
    .list_time .now td{
        color: white;
    }
    .list_time li .state{
        padding: 0 10px;
        font-size: 12px;
        line-height: 28px;
        border:1px solid #999;
        border-radius: 20px;
        text-align: center;
    }
    .list_time .now .state {
        font-size: 12px;
        line-height: 20px;
        width:auto;
        border:none;
        text-align: left;
    }
    .list_sale_group{
        width:1200px;
        overflow: hidden;
        margin: 0 auto;
        padding-bottom: 20px;
    }
    .list_sale_group li{
        width:291px;
        height:372px;
        float: left;
        margin-left: 12px;
        background: #fff;
        margin-top: 20px;
    }
    .list_sale_group li:nth-child(4n+1){
        margin-left: 0;
    }
    .list_sale_group li .pic{
        padding: 20px;
    }
    .list_sale_group li .pic img{
        width: 100%;
        height:214px;
        display: block;
    }
    .list_sale_group li .pic .title{
        font-size: 12px;
        line-height: 18px;
        color: #333;
        height: 36px;
        overflow: hidden;
        padding: 0 10px;
        margin-top: 20px;
    }
    .list_sale_group li .det{
        border:1px solid #E73F09;
        overflow: hidden;
    }
    .list_sale_group li .det_pri{
        padding-left: 0px;
        margin-top: 6px;
    }
    .list_sale_group li .det_pri .price{
        font-size: 20px;
        line-height: 30px;
        color: #E73F09;
    }
    .list_sale_group li .det_pri .price span{
        font-size: 12px;
    }
    .list_sale_group li .det_pri .price del{
        font-size: 12px;
        color: #999;
        margin-left: 5px;
    }
    .list_sale_group li .num{
        overflow: hidden;
    }
    .list_sale_group li .num .number{
        font-size: 12px;
        line-height: 14px;
        color: #999;
    }
    .list_sale_group li .num .process{
        width:88px;
        height: 10px;
        background: #B8B8B8;
        margin: 2px 0 0 3px;
    }
    .list_sale_group li .num .process span{
        background: #E73F09;
        height: 10px;
        display: block;
    }
    .list_sale_group li .go{
        width:90px;
        line-height: 60px;
        background: #E73F09;
        font-size: 16px;
        text-align: center;
    }
    .list_sale_group li .go a{
        color: #fff;
    }
    .begin_list .det{
        border:1px solid #473932!important;
    }
    .begin_list li .go{
        background: #473932;
    }
    .begin_list .process,.begin_list .number{
        display: none;
    }
    .list_sale_group .tip{
        display: none;
        font-size: 12px;
        line-height: 15px;
        color: #999;
    }
    .begin_list .tip{
        display: block;
    }
</style>
<!--限时抢购新-->

<div class="new_limit_con">
    <div class="con" style="width: 100%;">
        {volist name="banner" id="vo"}
        <img src="/{$vo.picUrl}" class="title_img" >
        {/volist}
    </div>
    <ul class="list_time">
        {volist name="type" id="vo"}
        <li {eq name="vo.id" value=":input('id')"}class="now"{/eq}>
        <a href="{:url('shop/Limited/index',['id'=>$vo.id])}">
            <table>
                <tr>
                    <td class="time">{$vo.name}</td>
                    <td>{eq name="key" value="0"}<div class="state">正在抢购</div>{else/}即将开场{/eq}</td>
                </tr>
            </table>
        </a>
        </li>
        {/volist}
    </ul>
    <ul class="list_sale_group">
        {volist name="limits" id="item"}
        <li>
            <div class="pic">
                {if condition="$end_id neq $item.rush_id"}
                <a href="#">
                    {else/}
                    <a href="{:url('ShopGoods/index',['good_id'=>$item.shop_goods.id])}">
                        {/if}
                        <img src="/{$item.shop_goods.thumb_img}">
                        <div class="title">{$item.shop_goods.title}</div>
                    </a>
            </div>
            <div class="det" {if condition="$end_id neq $item.rush_id"}style="border: 1px solid green;"{/if}>
            <div class="det_pri left">
                {if condition="$end_id neq $item.rush_id"}
                <div class="price" style="color: green;"><span>￥</span >{if condition="$Think.session.member_id"}{$item['shopGoods']['price']}{else/}{$hidden_price}{/if}</div>
                {else/}
                <div class="price"><span>￥</span>{if condition="$Think.session.member_id"}{$item['price']}{else/}{$hidden_price}{/if}<del>￥{if condition="$Think.session.member_id"}{$item['shopGoods']['price']}{else/}{$hidden_price}{/if}</del></div>
                {/if}
                <div class="num">
                    <span class="number left">已售{$item.percentage}</span>
                    <div class="process left">
                        <span style="width:{$item.percentage};{if condition="$end_id neq $item.rush_id"}background:green;{/if}"></span>
                    </div>
                    <div class="tip">限时抢购</div>
                </div>

            </div>
            {if condition="$end_id neq $item.rush_id"}
            <div class="go right" style="background-color: green;"><a href="#">即将开始</a></div>
            {else/}
            <div class="go right"><a href="{:url('ShopGoods/index',['good_id'=>$item.shop_goods.id])}">立即抢购</a></div>
            {/if}

</div>
</li>
{/volist}
</ul>

</div>
<div class="pages">{$limits->render();}</div>
<input type="hidden" id="end_time" value="{:date('Y/m/d H:i:s',$end_time)}">
<script>
    //倒计时效果js代码
    function checktime(i) {
        if (i < 10) {
            i = "0" + i;

        }
        else {
            i = i;
        }
        return i;
    }
    function freshTime() {
        var endtime = new Date($('#end_time').val());
        var nowtime = new Date();
        var lefttime = parseInt(endtime.getTime() - nowtime.getTime());//这是毫秒，如果再/1000就是秒
        // 获取剩下的日、小时、分钟、秒钟
        // 一天有多少毫秒，一小时有多少毫秒，一分钟有多少毫秒，一秒钟有多少毫秒
        var dm = 24 * 60 * 60 * 1000;
        var hm = 60 * 60 * 1000;
        var h = parseInt((lefttime / hm) % 24);
        var mm = 60 * 1000;
        var m = parseInt((lefttime / mm) % 60);
        var s = parseInt((lefttime / 1000) % 60);
        m = checktime(m);
        s = checktime(s);

        document.getElementById('LeftTime').innerHTML = h+"小时"+m+"分钟"+s+"秒";

        if (lefttime == 0) {
            location.reload();
        }

        if (lefttime < 0) {
            document.getElementById('LeftTime').innerHTML = "抢购活动已经结束！";
//
        }
    }
    freshTime();
    var sh;
    sh = setInterval('freshTime()', 1000);


    function jump_goods(id) {
        window.location.href = "{:url('shop/shop_goods/index')}?good_id="+id;
    }

</script>



{include file="public_foot"}